package com.lnking.lnkingplace.service;


import com.lnking.lnkingplace.model.dto.rectification.RectificationDetailDto;
import com.lnking.lnkingplace.model.dto.rectification.RectificationResultDto;
import com.lnking.lnkingplace.model.entity.Inspect;
import com.lnking.lnkingplace.model.entity.InspectResult;
import com.lnking.lnkingplace.model.entity.Rectification;
import com.lnking.lnkingplace.model.request.inspect.InspectResultRequest;
import com.lnking.lnkingplace.model.request.rectification.*;
import com.lnking.starter.mybatis.service.ICustomService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sn
 * @since 2022-08-19
 */
public interface IRectificationService extends ICustomService<Rectification> {

    /**
     * 创建
     * @param params
     */
    void add(RectificationAddRequest params) throws Exception;

    /**
     * 更新
     * @param params
     */
    void update(RectificationUpdateRequest params);

    /**
     * 场所确认 修改状态
     * @param id
     */
    void placeTrue(String id);

    /**
     *  整改详情
     * @param id
     * @return
     */
    RectificationDetailDto getDetailById(String id);

    /**
     * 复查
     * @param params
     */
    void review(InspectResult  params) throws Exception;

    void finish(InspectResultTrueRequest params);

    List<Inspect> getFail(String id);

    List<RectificationResultDto> getResult(String inspectId, String placeId);

    Rectification getReview(String placeId, String inspectId);

    Rectification getLastRecord(String placeId, String inspectId);

    Rectification getRectification(String placeId, String inspectId,Integer sort);

    void reviewResult(String rectificationId) throws Exception;

    Rectification getAfterInspect(String inspectId, String placeId);
    Rectification getCheck(String inspectId, String placeId);

    void resultStatus(String inspectId  ,String placeId);
}
